package com.chengh.vhr.common.myEnum;

/**
 * 自定义异常枚举
 * 规定
 *  总计5位数: 前两位标识是哪个模块,后两位顺序排列
 * @author chengh
 */
public enum ErrorCodeEnum {
    UNKNOW_EXCEPTION(10000,"系统未知异常"),
    VAILD_EXCEPTION(10001,"参数格式校验失败"),
    CUSTOM_EXCEPTION_101(10101,"不符合要求"),
    CUSTOM_EXCEPTION_102(10102,"删除失败,该部门有子部门!!!"),
    CUSTOM_EXCEPTION_103(10103,"员工有外键关联,删除失败");
    /**
     * 状态码
     */
    private final Integer code;

    /**
     * 返回的信息
     */
    private final String msg;

    ErrorCodeEnum(int code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
